package app.ui;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.AppCompatButton;
import android.support.v7.widget.LinearLayoutCompat;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

/** Created by wuzhengu on 2019/04/02 */
public class ActHome extends AppCompatActivity
{
	@Override
	protected void onCreate(@Nullable Bundle bundle){
		super.onCreate(bundle);
		Button button=new AppCompatButton(this);
		button.setText("TEST");
		button.setOnClickListener(new View.OnClickListener()
		{
			@Override
			public void onClick(View v){
				clickTest(v);
			}
		});
		setContentView(new LinearLayoutCompat(this)
		{{
			setOrientation(VERTICAL);
			addView(button);
		}});
	}
	
	public void clickTest(View v){
		Toast.makeText(this, test("hello"), Toast.LENGTH_SHORT).show();
	}
	
	String test(String what){
		return what;
	}
	
}
